package au.org.arcs.dss.provider.datasource.provider.stub;

import java.util.*;

import au.org.arcs.dss.provider.ConfigManager;
import au.org.arcs.dss.provider.dataset.DataSet;
import au.org.arcs.dss.provider.datasource.provider.DataSourceProvider;
import au.org.arcs.dss.provider.datasource.provider.ProviderAccount;

/**
 *
 * @author ming
 */
public class DataSourceProviderStubImpl implements DataSourceProvider {
  public DataSourceProviderStubImpl() {
   
  }

  public void setProviderAccount(ProviderAccount providerAccount) {

  }

  public List<DataSet> getDataSetsByPath(String path, boolean withData) {
    StubService stubService = new StubService();
    
    return stubService.getDataSets(path);
  }

  public DataSet getDataSetByPathAndName(String path, String name, boolean withData, boolean withDecendents, boolean withParent) {
    StubService stubService = new StubService();
    String stubPath = StubService.getPath(path, name);

    ConfigManager.logger.debug("Name: " + name);
    ConfigManager.logger.debug("Path: " + path);
    ConfigManager.logger.debug("Stub Path: " + stubPath);
    ConfigManager.logger.debug("With Decendents: " + withDecendents);
    ConfigManager.logger.debug("With Parent: " + withParent);

    return stubService.getDataSet(stubPath, withDecendents, withParent);
  }
}
